#
# Data processing configuration module
#

# Note that this file is part of the distribution and thus may change 
# we recommed that you make a copy of this file and use that for your work

# 
# attributes that must be present are capitalized
# 
import atlas

#
# turn various execution steps on or off
#
LOADER_ENABLED    = False
FITTER_ENABLED    = False
PREDICTOR_ENABLED = False
EXPORTER_ENABLED  = True

# specifies the data file format parser
from mod454.loader import loader as LOADER

# specifies the data fitter
from mod454.fitter import fitter as FITTER

# specifies the data predictor
from mod454.predictor import predictor as PREDICTOR

# specfies the data exporter
from atlas.commands import exporter as EXPORTER

#
# directory setup, a string containing the 
# full path to a directory 
# currently set to the default home
HOME = atlas.ENV.HOME_DIR 

#
# setting up various database locators 
#
organism = "human"
HDF_DATABASE = "%s/db/%s-data.hdf" % (HOME, organism)
SQL_URI = "sqlite:///%s/db/%s-data.sqlite" % (HOME, organism)

#
# overwrite existing lables
#
CLOBBER = True

#
# input data comes from this file
#
DATA_FILE = HOME + "/data/human-keji-zhao.txt"

#
# the size of the data vector (keep it less than 10 million)
#
DATA_SIZE = 3*10**7

#
# minimum peak height (larger values make for fewer data points)
#
MINIMUM_PEAK_SIZE = 1.0

#
# fitting tolerance
#
SIGMA = 20

#
# fitting width that the fitting function is computed over
#
WIDTH = SIGMA * 5

#
# labels for data, fitted data and peaks
#
DATA_LABEL = "H2AZ"
FIT_LABEL  = "%s-SIGMA-%s" % (DATA_LABEL, SIGMA)
PEAK_LABEL = "PRED-%s" % FIT_LABEL

#
# peak detection parameters, the exclusion zone is the region over 
# which only one peak may be predicted
#
EXCLUSION_ZONE = 147

#
# the full interval relative to the maxima
#
LEFT_SHIFT  = EXCLUSION_ZONE/2
RIGHT_SHIFT = EXCLUSION_ZONE/2

#
# data export 
#
EXPORT_LABELS  = [ PEAK_LABEL ]
EXPORT_DIR     = HOME + "/html/static/download"
